import Web3 from 'C:/Users/81437/Downloads/drst-front-feature-chenjinqian/drst-front-feature-chenjinqian/node_modules/web3/dist/web3.min.js'

export function getWeb3(addr) {
    if (window.ethereum) {
        //连接到Metamask
        return new Web3(window.ethereum);
    } else {
        ///连接到Ganache
        return new this.Web3(
            new Web3.providers.HttpProvider(addr)
        );
    }
}
